package cz.najman.emdroid.connection;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;

import org.apache.http.client.ClientProtocolException;
import org.xml.sax.SAXException;

import cz.najman.emdroid.content.ContentHandler;
import cz.najman.emdroid.content.ContentProducer;
import cz.najman.emdroid.utils.RequestIdentifier;

public interface Proccesor {	 
	
	/**
	 * 
	 * @param requestIdentifier
	 * @param contentHandler
	 * @param contentProducer
	 * @return
	 * @throws ClientProtocolException
	 * @throws IOException
	 * @throws ParserConfigurationException 
	 * @throws SAXException 
	 */
	public int create(RequestIdentifier requestIdentifier, ContentHandler contentHandler, ContentProducer contentProducer);
	
	/**
	 * 
	 * @param requestIdentifier
	 * @param contentHandler
	 * @return
	 * @throws ClientProtocolException
	 * @throws IOException
	 * @throws ParserConfigurationException 
	 * @throws SAXException 
	 */
	public int retrieve(RequestIdentifier requestIdentifier, ContentHandler contentHandler);
	
	/**
	 * 
	 * @param requestIdentifier
	 * @param contentHandler
	 * @param contentProducer
	 * @return
	 * @throws ClientProtocolException
	 * @throws IOException
	 * @throws ParserConfigurationException 
	 * @throws SAXException 
	 */
	public int update(RequestIdentifier requestIdentifier, ContentHandler contentHandler, ContentProducer contentProducer);	
	
	/**
	 * 
	 * @param requestIdentifier
	 * @return
	 * @throws SAXException
	 * @throws ParserConfigurationException
	 */
	public int delete(RequestIdentifier requestIdentifier);
	
}
